home *** CD-ROM | disk | FTP | other *** search
/ 1000 Apple LAN Literacy / 1000 Apple LAN Literacy.iso / Apple LAN Literacy / Literacy Segments Part 3 / Literacy Segments Part 3 / background_97850.txt < prev    next >
Text File  |  1989-08-22  |  15KB  |  681 lines

  1. -- background: 97850 from stack: in
  2. -- bmap block id: 98154
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 2.4.1 Practice6
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global answerTracker
  9.   send mouseUp to bg btn "done"
  10.   put line (line 2 of fld "key") of answerTracker into theLocs
  11.   if theLocs is not empty then
  12.     repeat with i = 1 to number of lines in fld "origins"
  13.       get item (i*2 - 1) to (i*2) of theLocs
  14.       set the loc of bg btn ("graphic" & i) to it
  15.     end repeat
  16.   else
  17.     repeat with j = 1 to number of lines in fld "origins"
  18.       set the loc of bg btn ("graphic" & j) to (line j of fld "origins")
  19.     end repeat
  20.   end if
  21.   pass openCard
  22. end openCard
  23.  
  24. on closeCard
  25.   global answerTracker
  26.   get line 2 of fld "key"  -- says which line of global to worry about
  27.   put empty into line it of answerTracker
  28.   repeat with i = 1 to number of lines in fld "origins"
  29.     put the loc of bg btn ("graphic" & i) & "," after line it of answerTracker
  30.   end repeat
  31.   delete last char of line it of answerTracker
  32.   pass closeCard
  33. end closeCard
  34.  
  35. on moveButton
  36.   get fld "decisions"
  37.   repeat until the mouse is up
  38.     if item 2 of the mouseLoc > line 1 of it
  39.     then set the loc of the target to the mouseLoc
  40.   end repeat
  41.   put the loc of the target into temp
  42.   if item 1 of the loc of the target > (line 2 of it) then
  43.     if item 2 of the loc of the target < (line 3 of it) then
  44.       validate (line 1 of fld "destinations")
  45.     else if item 2 of the loc of the target < (line 4 of it) then
  46.       validate (line 2 of fld "destinations")
  47.     else if item 2 of the loc of the target < (line 5 of it) then
  48.       validate (line 3 of fld "destinations")
  49.     else if item 2 of the loc of the target < (line 6 of it) then
  50.       validate (line 4 of fld "destinations")
  51.     else validate (line 5 of fld "destinations")
  52.   end if
  53.   if the loc of the target = temp
  54.   then set the loc of the target to line (last char of the short name of the target) of fld "origins"
  55. end moveButton
  56.  
  57. on validate where
  58.   repeat with i = 1 to number of lines in fld "origins"
  59.     if the short name of the target = ("graphic" & i) then next repeat
  60.     if the loc of bg btn ("graphic" & i) = where then exit validate
  61.   end repeat
  62.   set the loc of the target to where
  63. end validate
  64.  
  65. on hideFeedback
  66.   lock screen
  67.   hide fld "Feedback1"
  68.   hide fld "Feedback2"
  69.   hide fld "Feedback3"
  70.   hide fld "Feedback4"
  71.   hide fld "Feedback5"
  72.   hide fld "CorrectAnswer"
  73.   hide fld "MasterFeedback"
  74.   hide bg btn "Done"
  75.   unlock screen
  76. end hideFeedback
  77.  
  78. on showFeedback
  79.   lock screen
  80.   show fld "Feedback1"
  81.   show fld "Feedback2"
  82.   show fld "Feedback3"
  83.   show fld "Feedback4"
  84.   show fld "Feedback5"
  85.   show fld "CorrectAnswer"
  86.   show fld "MasterFeedback"
  87.   show bg btn "Done"
  88.   unlock screen
  89. end showFeedback
  90.  
  91.  
  92.  
  93. -- part 3 (field)
  94. -- low flags: 01
  95. -- high flags: 0000
  96. -- rect: left=18 top=1 right=38 bottom=442
  97. -- title width / last selected line: 0
  98. -- icon id / first selected line: 0 / 0
  99. -- text alignment: 0
  100. -- font id: 156
  101. -- text size: 24
  102. -- style flags: 10240
  103. -- line height: 32
  104. -- part name: Title
  105.  
  106.  
  107. -- part 14 (button)
  108. -- low flags: 00
  109. -- high flags: 0000
  110. -- rect: left=443 top=5 right=72 bottom=512
  111. -- title width / last selected line: 0
  112. -- icon id / first selected line: 0 / 0
  113. -- text alignment: 1
  114. -- font id: 0
  115. -- text size: 12
  116. -- style flags: 0
  117. -- line height: 16
  118. -- part name: Instant Reference
  119. ----- HyperTalk script -----
  120. on mouseUp
  121.   instantReference "2.4.1"
  122. end mouseUp
  123.  
  124.  
  125. -- part 15 (button)
  126. -- low flags: 00
  127. -- high flags: 2000
  128. -- rect: left=480 top=143 right=172 bottom=511
  129. -- title width / last selected line: 0
  130. -- icon id / first selected line: 1310 / 1310
  131. -- text alignment: 1
  132. -- font id: 0
  133. -- text size: 12
  134. -- style flags: 0
  135. -- line height: 16
  136. -- part name: Student Services
  137. ----- HyperTalk script -----
  138. on mousedown
  139.   SSpopUp
  140. end mousedown
  141.  
  142. on mouseup
  143.   if the mouseloc is not within the rect of me then exit to hyperCard
  144.   doSS
  145. end mouseup
  146.  
  147.  
  148.  
  149. -- part 16 (button)
  150. -- low flags: 00
  151. -- high flags: 2000
  152. -- rect: left=482 top=176 right=205 bottom=511
  153. -- title width / last selected line: 0
  154. -- icon id / first selected line: 162 / 162
  155. -- text alignment: 1
  156. -- font id: 0
  157. -- text size: 12
  158. -- style flags: 0
  159. -- line height: 16
  160. -- part name: Help
  161. ----- HyperTalk script -----
  162. on mouseUp
  163.   Help
  164. end mouseUp
  165.  
  166.  
  167.  
  168. -- part 17 (button)
  169. -- low flags: 00
  170. -- high flags: 2000
  171. -- rect: left=482 top=294 right=320 bottom=509
  172. -- title width / last selected line: 0
  173. -- icon id / first selected line: 1236 / 1236
  174. -- text alignment: 1
  175. -- font id: 0
  176. -- text size: 12
  177. -- style flags: 0
  178. -- line height: 16
  179. -- part name: Last Menu
  180. ----- HyperTalk script -----
  181. on mouseUp
  182.   go cd "Network Services P/1"
  183. end mouseUp
  184.  
  185.  
  186.  
  187. -- part 18 (button)
  188. -- low flags: 00
  189. -- high flags: 2000
  190. -- rect: left=478 top=319 right=341 bottom=498
  191. -- title width / last selected line: 0
  192. -- icon id / first selected line: 1238 / 1238
  193. -- text alignment: 1
  194. -- font id: 0
  195. -- text size: 12
  196. -- style flags: 0
  197. -- line height: 16
  198. -- part name: Prev
  199. ----- HyperTalk script -----
  200. on mouseUp
  201.   lock screen
  202.   go prev
  203.   unlock screen with scroll right
  204. end mouseUp
  205.  
  206.  
  207. -- part 19 (button)
  208. -- low flags: 00
  209. -- high flags: 2000
  210. -- rect: left=493 top=319 right=341 bottom=512
  211. -- title width / last selected line: 0
  212. -- icon id / first selected line: 1237 / 1237
  213. -- text alignment: 1
  214. -- font id: 0
  215. -- text size: 12
  216. -- style flags: 0
  217. -- line height: 16
  218. -- part name: Next
  219. ----- HyperTalk script -----
  220. on mouseUp
  221.   lock screen
  222.   go next
  223.   unlock screen with scroll left
  224. end mouseUp
  225.  
  226.  
  227. -- part 20 (field)
  228. -- low flags: 01
  229. -- high flags: 0000
  230. -- rect: left=16 top=38 right=65 bottom=437
  231. -- title width / last selected line: 0
  232. -- icon id / first selected line: 0 / 0
  233. -- text alignment: 0
  234. -- font id: 156
  235. -- text size: 20
  236. -- style flags: 0
  237. -- line height: 26
  238. -- part name: Subtitle
  239.  
  240.  
  241. -- part 21 (field)
  242. -- low flags: 01
  243. -- high flags: 0000
  244. -- rect: left=16 top=68 right=88 bottom=470
  245. -- title width / last selected line: 0
  246. -- icon id / first selected line: 0 / 0
  247. -- text alignment: 0
  248. -- font id: 3
  249. -- text size: 10
  250. -- style flags: 256
  251. -- line height: 15
  252. -- part name: Instruction
  253.  
  254.  
  255. -- part 22 (field)
  256. -- low flags: 01
  257. -- high flags: 0000
  258. -- rect: left=161 top=95 right=132 bottom=472
  259. -- title width / last selected line: 0
  260. -- icon id / first selected line: 0 / 0
  261. -- text alignment: 0
  262. -- font id: 156
  263. -- text size: 16
  264. -- style flags: 0
  265. -- line height: 17
  266. -- part name: Item1
  267.  
  268.  
  269. -- part 23 (field)
  270. -- low flags: 01
  271. -- high flags: 0000
  272. -- rect: left=161 top=138 right=175 bottom=472
  273. -- title width / last selected line: 0
  274. -- icon id / first selected line: 0 / 0
  275. -- text alignment: 0
  276. -- font id: 156
  277. -- text size: 16
  278. -- style flags: 0
  279. -- line height: 17
  280. -- part name: Item2
  281.  
  282.  
  283. -- part 24 (field)
  284. -- low flags: 01
  285. -- high flags: 0000
  286. -- rect: left=161 top=183 right=219 bottom=472
  287. -- title width / last selected line: 0
  288. -- icon id / first selected line: 0 / 0
  289. -- text alignment: 0
  290. -- font id: 156
  291. -- text size: 16
  292. -- style flags: 0
  293. -- line height: 17
  294. -- part name: Item3
  295.  
  296.  
  297. -- part 25 (field)
  298. -- low flags: 01
  299. -- high flags: 0000
  300. -- rect: left=161 top=228 right=265 bottom=472
  301. -- title width / last selected line: 0
  302. -- icon id / first selected line: 0 / 0
  303. -- text alignment: 0
  304. -- font id: 156
  305. -- text size: 16
  306. -- style flags: 0
  307. -- line height: 17
  308. -- part name: Item4
  309.  
  310.  
  311. -- part 26 (field)
  312. -- low flags: 01
  313. -- high flags: 0000
  314. -- rect: left=161 top=274 right=311 bottom=472
  315. -- title width / last selected line: 0
  316. -- icon id / first selected line: 0 / 0
  317. -- text alignment: 0
  318. -- font id: 156
  319. -- text size: 16
  320. -- style flags: 0
  321. -- line height: 17
  322. -- part name: Item5
  323.  
  324.  
  325. -- part 28 (button)
  326. -- low flags: 00
  327. -- high flags: 0000
  328. -- rect: left=20 top=185 right=217 bottom=53
  329. -- title width / last selected line: 0
  330. -- icon id / first selected line: 832 / 832
  331. -- text alignment: 1
  332. -- font id: 0
  333. -- text size: 12
  334. -- style flags: 0
  335. -- line height: 16
  336. -- part name: Graphic1
  337. ----- HyperTalk script -----
  338. on mouseDown
  339.   moveButton
  340. end mouseDown
  341.  
  342.  
  343. -- part 30 (button)
  344. -- low flags: 00
  345. -- high flags: 0000
  346. -- rect: left=20 top=275 right=307 bottom=53
  347. -- title width / last selected line: 0
  348. -- icon id / first selected line: 10453 / 10453
  349. -- text alignment: 1
  350. -- font id: 0
  351. -- text size: 12
  352. -- style flags: 0
  353. -- line height: 16
  354. -- part name: Graphic3
  355. ----- HyperTalk script -----
  356. on mouseDown
  357.   moveButton
  358. end mouseDown
  359.  
  360.  
  361. -- part 31 (button)
  362. -- low flags: 00
  363. -- high flags: 0000
  364. -- rect: left=20 top=98 right=130 bottom=53
  365. -- title width / last selected line: 0
  366. -- icon id / first selected line: 13560 / 13560
  367. -- text alignment: 1
  368. -- font id: 0
  369. -- text size: 12
  370. -- style flags: 0
  371. -- line height: 16
  372. -- part name: Graphic4
  373. ----- HyperTalk script -----
  374. on mouseDown
  375.   moveButton
  376. end mouseDown
  377.  
  378.  
  379. -- part 32 (button)
  380. -- low flags: 00
  381. -- high flags: 0000
  382. -- rect: left=20 top=141 right=173 bottom=53
  383. -- title width / last selected line: 0
  384. -- icon id / first selected line: 6758 / 6758
  385. -- text alignment: 1
  386. -- font id: 0
  387. -- text size: 12
  388. -- style flags: 0
  389. -- line height: 16
  390. -- part name: Graphic5
  391. ----- HyperTalk script -----
  392. on mouseDown
  393.   moveButton
  394. end mouseDown
  395.  
  396.  
  397. -- part 35 (field)
  398. -- low flags: 81
  399. -- high flags: 2007
  400. -- rect: left=8 top=36 right=94 bottom=231
  401. -- title width / last selected line: 0
  402. -- icon id / first selected line: 0 / 0
  403. -- text alignment: 0
  404. -- font id: 156
  405. -- text size: 16
  406. -- style flags: 0
  407. -- line height: 17
  408. -- part name: Feedback1
  409.  
  410.  
  411. -- part 43 (field)
  412. -- low flags: 81
  413. -- high flags: 2007
  414. -- rect: left=8 top=97 right=155 bottom=231
  415. -- title width / last selected line: 0
  416. -- icon id / first selected line: 0 / 0
  417. -- text alignment: 0
  418. -- font id: 156
  419. -- text size: 16
  420. -- style flags: 0
  421. -- line height: 17
  422. -- part name: Feedback2
  423.  
  424.  
  425. -- part 37 (field)
  426. -- low flags: 81
  427. -- high flags: 2007
  428. -- rect: left=8 top=159 right=216 bottom=231
  429. -- title width / last selected line: 0
  430. -- icon id / first selected line: 0 / 0
  431. -- text alignment: 0
  432. -- font id: 156
  433. -- text size: 16
  434. -- style flags: 0
  435. -- line height: 17
  436. -- part name: Feedback3
  437.  
  438.  
  439. -- part 38 (field)
  440. -- low flags: 81
  441. -- high flags: 2007
  442. -- rect: left=8 top=219 right=277 bottom=231
  443. -- title width / last selected line: 0
  444. -- icon id / first selected line: 0 / 0
  445. -- text alignment: 0
  446. -- font id: 156
  447. -- text size: 16
  448. -- style flags: 0
  449. -- line height: 17
  450. -- part name: Feedback4
  451.  
  452.  
  453. -- part 40 (field)
  454. -- low flags: 81
  455. -- high flags: 2007
  456. -- rect: left=8 top=280 right=338 bottom=231
  457. -- title width / last selected line: 0
  458. -- icon id / first selected line: 0 / 0
  459. -- text alignment: 0
  460. -- font id: 156
  461. -- text size: 16
  462. -- style flags: 0
  463. -- line height: 17
  464. -- part name: CorrectAnswer
  465.  
  466.  
  467. -- part 41 (field)
  468. -- low flags: 81
  469. -- high flags: 2004
  470. -- rect: left=147 top=132 right=304 bottom=356
  471. -- title width / last selected line: 0
  472. -- icon id / first selected line: 0 / 0
  473. -- text alignment: 0
  474. -- font id: 156
  475. -- text size: 16
  476. -- style flags: 0
  477. -- line height: 17
  478. -- part name: MasterFeedback
  479.  
  480.  
  481. -- part 39 (field)
  482. -- low flags: 81
  483. -- high flags: 2007
  484. -- rect: left=238 top=32 right=89 bottom=461
  485. -- title width / last selected line: 0
  486. -- icon id / first selected line: 0 / 0
  487. -- text alignment: 0
  488. -- font id: 156
  489. -- text size: 16
  490. -- style flags: 0
  491. -- line height: 17
  492. -- part name: Feedback5
  493.  
  494.  
  495. -- part 42 (button)
  496. -- low flags: 80
  497. -- high flags: A002
  498. -- rect: left=215 top=279 right=296 bottom=284
  499. -- title width / last selected line: 0
  500. -- icon id / first selected line: 0 / 0
  501. -- text alignment: 1
  502. -- font id: 0
  503. -- text size: 12
  504. -- style flags: 0
  505. -- line height: 16
  506. -- part name: Done
  507. ----- HyperTalk script -----
  508. on mouseUp
  509.   lock screen
  510.   hide fld "MasterFeedback"
  511.   hide bg btn "Done"
  512.   unlock screen
  513. end mouseUp
  514.  
  515.  
  516.  
  517. -- part 5 (field)
  518. -- low flags: 81
  519. -- high flags: 0001
  520. -- rect: left=423 top=0 right=13 bottom=466
  521. -- title width / last selected line: 0
  522. -- icon id / first selected line: 0 / 0
  523. -- text alignment: 65535
  524. -- font id: 4
  525. -- text size: 9
  526. -- style flags: 0
  527. -- line height: 12
  528. -- part name: CardTitle
  529.  
  530.  
  531. -- part 44 (button)
  532. -- low flags: 00
  533. -- high flags: A004
  534. -- rect: left=268 top=321 right=340 bottom=413
  535. -- title width / last selected line: 0
  536. -- icon id / first selected line: 0 / 0
  537. -- text alignment: 1
  538. -- font id: 0
  539. -- text size: 12
  540. -- style flags: 0
  541. -- line height: 16
  542. -- part name: Answer
  543. ----- HyperTalk script -----
  544. on mouseUp
  545.   send mouseUp to bg btn "done"
  546.   repeat with i = 1 to number of lines in fld "origins"
  547.     set the loc of bg btn ("graphic" & i) to (line i of fld "origins")
  548.   end repeat
  549.   put line 1 of fld "key" into theLocs
  550.   repeat with i = 1 to number of lines in fld "origins"
  551.     get item (i*2 - 1) to (i*2) of theLocs
  552.     set the loc of bg btn ("graphic" & i) to it
  553.   end repeat
  554. end mouseUp
  555.  
  556.  
  557. -- part 53 (button)
  558. -- low flags: 00
  559. -- high flags: 2000
  560. -- rect: left=482 top=208 right=234 bottom=509
  561. -- title width / last selected line: 0
  562. -- icon id / first selected line: 1234 / 1234
  563. -- text alignment: 1
  564. -- font id: 0
  565. -- text size: 12
  566. -- style flags: 0
  567. -- line height: 16
  568. -- part name: Lesson
  569. ----- HyperTalk script -----
  570. on mouseUp
  571.   lesson "2.4.1"
  572. end mouseUp
  573.  
  574.  
  575. -- part 54 (button)
  576. -- low flags: 00
  577. -- high flags: A004
  578. -- rect: left=68 top=321 right=340 bottom=213
  579. -- title width / last selected line: 0
  580. -- icon id / first selected line: 0 / 0
  581. -- text alignment: 1
  582. -- font id: 0
  583. -- text size: 12
  584. -- style flags: 0
  585. -- line height: 16
  586. -- part name: Check Answer
  587. ----- HyperTalk script -----
  588. on mouseUp
  589.   lock screen
  590.   set cursor to watch
  591.   put empty into theList
  592.   get line 1 of fld "key"
  593.   repeat with i = 1 to (number of items in it)/2
  594.     put item (i*2 - 1) of it & "," & item (i*2) of it into theLoc
  595.     if the loc of bg btn ("graphic" & i) = theLoc
  596.     then put "t," after theList
  597.   else put "f," after theList
  598. end repeat
  599. delete last char of theList
  600. if theList = "t,t,t,t,t"
  601. then put fld "feedback1" into fld "MasterFeedback"
  602. else put fld "feedback2"  into fld "MasterFeedback"
  603. show fld "MasterFeedback"
  604. show bg btn "Done"
  605. unlock screen
  606. end mouseUp
  607.  
  608.  
  609. -- part 55 (field)
  610. -- low flags: 81
  611. -- high flags: 0002
  612. -- rect: left=0 top=0 right=99 bottom=81
  613. -- title width / last selected line: 0
  614. -- icon id / first selected line: 0 / 0
  615. -- text alignment: 0
  616. -- font id: 3
  617. -- text size: 12
  618. -- style flags: 0
  619. -- line height: 16
  620. -- part name: origins
  621.  
  622.  
  623. -- part 56 (field)
  624. -- low flags: 81
  625. -- high flags: 0002
  626. -- rect: left=85 top=0 right=99 bottom=166
  627. -- title width / last selected line: 0
  628. -- icon id / first selected line: 0 / 0
  629. -- text alignment: 0
  630. -- font id: 3
  631. -- text size: 12
  632. -- style flags: 0
  633. -- line height: 16
  634. -- part name: destinations
  635.  
  636.  
  637. -- part 57 (field)
  638. -- low flags: 81
  639. -- high flags: 0002
  640. -- rect: left=174 top=0 right=99 bottom=255
  641. -- title width / last selected line: 0
  642. -- icon id / first selected line: 0 / 0
  643. -- text alignment: 0
  644. -- font id: 3
  645. -- text size: 12
  646. -- style flags: 0
  647. -- line height: 16
  648. -- part name: decisions
  649.  
  650.  
  651. -- part 59 (button)
  652. -- low flags: 00
  653. -- high flags: 0000
  654. -- rect: left=20 top=231 right=263 bottom=53
  655. -- title width / last selected line: 0
  656. -- icon id / first selected line: 12010 / 12010
  657. -- text alignment: 1
  658. -- font id: 0
  659. -- text size: 12
  660. -- style flags: 0
  661. -- line height: 16
  662. -- part name: Graphic2
  663. ----- HyperTalk script -----
  664. on mouseDown
  665.   moveButton
  666. end mouseDown
  667.  
  668.  
  669. -- part 58 (field)
  670. -- low flags: 81
  671. -- high flags: 0002
  672. -- rect: left=0 top=100 right=135 bottom=288
  673. -- title width / last selected line: 0
  674. -- icon id / first selected line: 0 / 0
  675. -- text alignment: 0
  676. -- font id: 3
  677. -- text size: 12
  678. -- style flags: 0
  679. -- line height: 16
  680. -- part name: key
  681.